package com.baitai.system.service;

import java.util.Date;
import java.util.List;
import com.baitai.system.domain.UserPointsLog;

/**
 * 积分明细Service接口
 * 
 * @author xx
 * @date 2024-07-21
 */
public interface IUserPointsLogService 
{
    /**
     * 查询积分明细
     * 
     * @param id 积分明细主键
     * @return 积分明细
     */
    public UserPointsLog selectUserPointsLogById(Long id);

    /**
     * 查询积分明细列表
     * 
     * @param userPointsLog 积分明细
     * @return 积分明细集合
     */
    public List<UserPointsLog> selectUserPointsLogList(UserPointsLog userPointsLog);

    /**
     * 新增积分明细
     * 
     * @param userPointsLog 积分明细
     * @return 结果
     */
    public int insertUserPointsLog(UserPointsLog userPointsLog);

    /**
     * 修改积分明细
     * 
     * @param userPointsLog 积分明细
     * @return 结果
     */
    public int updateUserPointsLog(UserPointsLog userPointsLog);

    /**
     * 批量删除积分明细
     * 
     * @param ids 需要删除的积分明细主键集合
     * @return 结果
     */
    public int deleteUserPointsLogByIds(Long[] ids);

    /**
     * 删除积分明细信息
     * 
     * @param id 积分明细主键
     * @return 结果
     */
    public int deleteUserPointsLogById(Long id);

    void gainPoints(Long userId,String pointsChange,String actionType,String actionDetail);
    int losePoints(Long userId,String pointsChange,String actionType,String actionDetail);

    List<UserPointsLog> selectUserPointsLogList(Long userId, Date start, Date end,String actionType);
}
